﻿<phone:PhoneApplicationPage 
    x:Class="WinMilk.Gui.SettingsPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" xmlns:WinMilk_Gui_Controls="clr-namespace:WinMilk.Gui.Controls"
    xmlns:local="clr-namespace:WinMilk.Gui"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <phone:PhoneApplicationPage.Resources>
        <local:AppSettings x:Key="appSettings"></local:AppSettings>
    </phone:PhoneApplicationPage.Resources>

    <phone:PhoneApplicationPage.FontFamily>
        <StaticResource ResourceKey="PhoneFontFamilyNormal"/>
    </phone:PhoneApplicationPage.FontFamily>
    <phone:PhoneApplicationPage.FontSize>
        <StaticResource ResourceKey="PhoneFontSizeNormal"/>
    </phone:PhoneApplicationPage.FontSize>
    <phone:PhoneApplicationPage.Foreground>
        <StaticResource ResourceKey="PhoneForegroundBrush"/>
    </phone:PhoneApplicationPage.Foreground>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <controls:Pivot Name="HelpPivot" Title="{Binding Loc.AppNameCaps, Source={StaticResource L10N}}">
            <controls:PivotItem Name="Settings" Header="{Binding Loc.SettingsPageHeader, Source={StaticResource L10N}}">
                <ScrollViewer Margin="0">
                    <StackPanel>
                        <toolkit:ListPicker Name="StartSetting" Header="{Binding Loc.SettingsStartPage, Source={StaticResource L10N}}">
                            <toolkit:ListPickerItem Content="{Binding Loc.TasksHeader, Source={StaticResource L10N}}" />
                            <toolkit:ListPickerItem Content="{Binding Loc.ListsHeader, Source={StaticResource L10N}}" />
                            <toolkit:ListPickerItem Content="{Binding Loc.TagsHeader, Source={StaticResource L10N}}" />
                        </toolkit:ListPicker>
                    </StackPanel>
                </ScrollViewer>
            </controls:PivotItem>

            <controls:PivotItem Name="About" Header="{Binding Loc.AboutPageHeader, Source={StaticResource L10N}}">
                <ScrollViewer Margin="0">
                    <StackPanel Orientation="Vertical">

                        <TextBlock FontSize="24" Margin="0,10,0,10" Text="{Binding Loc.AboutVersion, Source={StaticResource L10N}}"/>

                        <toolkit:WrapPanel Margin="0,10,0,10">
                            <TextBlock Text="{Binding Loc.AboutCreatedBy, Source={StaticResource L10N}}" FontSize="24"/>
                            <HyperlinkButton HorizontalAlignment="Left"
                                Content="{Binding Loc.AboutAuthorLink, Source={StaticResource L10N}}" 
                                Click="Author_Click"/>
                        </toolkit:WrapPanel>

                        <HyperlinkButton HorizontalAlignment="Left"
                            Content="{Binding Loc.AboutVisitSite, Source={StaticResource L10N}}"
                            Click="Site_Click" Margin="-10,10"/>

                        <HyperlinkButton HorizontalAlignment="Left"
                            Content="{Binding Loc.AboutReview, Source={StaticResource L10N}}"
                            Click="Review_Click" Margin="-10,10"/>

                        <TextBlock Margin="0,10,0,10" TextWrapping="Wrap" Text="{Binding Loc.AboutCodeplex, Source={StaticResource L10N}}" FontSize="24"/>

                        <TextBlock Margin="0,10,0,10" TextWrapping="Wrap" Text="{Binding Loc.AboutContributors, Source={StaticResource L10N}}" FontSize="24"/>

                        <HyperlinkButton Margin="-10,10" HorizontalAlignment="Left"
                                Content="{Binding Loc.AboutCodeplexLink, Source={StaticResource L10N}}" 
                                Click="Codeplex_Click"/>

                        <HyperlinkButton HorizontalAlignment="Left"
                            Content="{Binding Loc.AboutReport, Source={StaticResource L10N}}"
                            Click="Report_Click" Margin="-10,10"/>

                        <TextBlock FontSize="24" TextWrapping="Wrap" Margin="0,10" Text="{Binding Loc.AboutDisclaimer, Source={StaticResource L10N}}"/>

                        <HyperlinkButton HorizontalAlignment="Left"
                            Content="{Binding Loc.AboutRTMLink, Source={StaticResource L10N}}"
                            Click="RTM_Click" Margin="-10,10"/>

                    </StackPanel>
                </ScrollViewer>
            </controls:PivotItem>
        </controls:Pivot>
    </Grid>
</phone:PhoneApplicationPage>